package com.gai.adivce;


import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * 前置增强
 */
public class BeforeAddEmp implements MethodBeforeAdvice {
    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("方法名:"+method.getName());
        System.out.println("方法参数:"+ Arrays.toString(args));
        System.out.println("目标名:"+target.getClass().getSimpleName());
        System.out.println("这里是前置增强emp=========================>");
    }
}
